
<?php include_once 'common/header.php';  ?>
<!-- admin_main -->
<div class="admin_main">
	<!-- Admin_top end -->
	<?php include_once 'common/account_left.php';  ?>
	<!-- Admin_Left End -->
	<div class="admin_right">
		<div class="admin_right_title">
			<strong>资金管理</strong> &gt;&gt; 时时资金日志
		</div>		
		<div class="admin_right_con">
			<table border="0" cellspacing="1" cellpadding="0" bgcolor="#CCCCCC">
			  <tr style="color:#0068b7;">
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>编号</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>用户名</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>真实姓名</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>客户类型</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>操作类型</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>账户总额</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>操作金额</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>可用金额</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>冻结金额</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>待收金额</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>交易方</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>备注</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>操作时间</strong></td>
			  </tr>
			  <?php foreach($accountlog_list as $key=>$accountlog){?>
			  <tr>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $accountlog['id'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><a href="javascript:search('<?php echo $accountlog['username'];?>');"><?php echo $accountlog['username'];?></a></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $accountlog['realname'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $user_loan[$accountlog['is_loan']];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $account_type[$accountlog['ftype']];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo number_format($accountlog['total'],2);?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo number_format($accountlog['money'],2);?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo number_format($accountlog['use_money'],2);?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo number_format($accountlog['no_use_money'],2);?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo number_format($accountlog['collection'],2);?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $accountlog['to_user'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $accountlog['remark'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo date('Y-m-d H:i:s',$accountlog['add_time']);?></td>
			  </tr>
			  <?php }?>
			  <tr>
			  	<td colspan="13" bgcolor="#FFFFFF" height="35">
			  		<form id="searchForm" action="/ychadmin/accountlog/accountloglist/" method="get">
			  			用户名：<input type="text" id="username" name="username" style="width: 100px;" value="<?php echo $username?>" />
			  			类型：<select id="ftype" name="ftype">
			  				<option value="0" <?php if($ftype==0){?>selected="selected"<?php }?>>所有</option>
			  				<?php foreach($account_type as $key=>$value){?>
			  				<option value="<?php echo $key?>" <?php if($ftype==$key){?>selected="selected"<?php }?>><?php echo $value;?></option>
			  				<?php }?>
			  			</select>
			  			开始时间：<input type="text" id="strtime" name="strtime" style="width: 100px;" value="<?php echo $strtime;?>"  onfocus="WdatePicker()" />
			  			结束时间：<input type="text" id="endtime" name="endtime" style="width: 100px;" value="<?php echo $endtime;?>"  onfocus="WdatePicker()" />
			  			<input type="submit" value="查询" />
			  		</form>
			  	</td>
			  </tr>
			  <tr>
			 	<td colspan="2" align="center" valign="middle" bgcolor="#FFFFFF"><a href="/ychadmin/accountlog/accountlogexcel/?username=<?php echo $username;?>&ftype=<?php echo $ftype;?>&strtime=<?php echo $strtime;?>&endtime=<?php echo $endtime;?>">导出数据</a></td>
			  	 <td colspan="11"  height="35" align="center" valign="middle" bgcolor="#FFFFFF" class="page"><?php echo $this->pagination->create_links();?>共<?php echo $accountlog_count;?>条记录</td>
			  </tr>
			</table>
			</div>
	</div>
<!-- Admin_Right End -->
</div>
<!-- admin_main end -->
<script>
function search(username){
	$("#username").val(username);
	$("#searchForm").submit();
}
</script>
</body>
</html>
